package plant;

public class CarStore {
    public Car buyCar(String type){
       if(type.equals("Auto")){
           return new Auto(new Engine("GK5"), new Gearbox("FSO-10209A"), new Chassis("GW4G15"));
       }else if(type.equals("Suv")){
           return new Suv(new Engine("SKYLINE GT-R R34"), new Gearbox("FSO-10209A"), new Chassis("R20A7"));
       }else if (type.equals("Trucks")){
           return new Trucks(new Engine("Carrera"), new Gearbox("HW18709"), new Chassis("K24W5"));
       }else {
           return null;
       }
    }
}
